import request from "../utils/request.js";
//发送请求
export function login(adminname,password){
    return request({
        url:"/admin/admin/login",
        method:"post",
        data:{
            adminname,
            password
        }
    })
}

//TODO 添加管理员信息
//把这些参数当成一个params来传
 export function addAdminInfoAPI(params){
    console.log(params);
    return request({
        url:"admin/admin/add",
        method:"post",
        data:params,
    })
 }

 //获取管理员信息

 export function getAdminListAPI(){
    return request({
        url:"/admin/admin/list",
    })
 }


//删除管理员信息
export const delAdminInfoAPI = (data) =>{
	return request({
		url:"/admin/admin/delete",
		method:"post",
		data
	})
}

//修改管理员信息
export const updateAdminInfoAPI = (data) =>{
    return request({
        url:"/admin/admin/update",
        method:"post",
        data
    })
}

 